<template>
  <div class="app-container">
    <div class="hor  pd-tb10">
      <div class="hor  ver-center">
        <div class="pd-lr10">项目名称:</div>
        <div>{{ this.projectInfo.name }}</div>
        <div class="pd-lr25"></div>
        <div class="pd-lr10">省市:</div>
        <div>{{ this.projectInfo.province + "-" + this.projectInfo.city }}</div>
      </div>
      <div class="flex1 pd-lr10"></div>
      <div class="flex1 pd-lr10"></div>
      <div class="hor  ver-center">
        <el-button type="primary" icon="" size="mini" class="hor"
                   @click="onClickOpen(3)" v-if="pankingProcessList.length > 0">投标报价横向对比
        </el-button>
        <el-button type="primary" icon="" size="mini" class="hor"
                   @click="onClickOpen(1)" v-if="pankingProcessList.length > 0">综合单价横向对比
        </el-button>
        <el-button type="primary" icon="el-icon" size="mini" class="hor"
                   @click="onClickSearch()">刷新
        </el-button>
      </div>
    </div>
    <div class="ver mg-b-10">
      <div class="ver">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="回标1" :name="1"></el-tab-pane>
          <el-tab-pane label="回标2" :name="2"></el-tab-pane>
          <el-tab-pane label="回标3" :name="3"></el-tab-pane>
        </el-tabs>
      </div>

      <div class="ver hor-center">
        <div class="pd-tb25">
          <table class="cus-table match-width" border="1px">
            <div class="loading-overlay">
              <div class="loading-text">加载中...</div>
            </div>
            <tr>
              <th style="width: 40px !important;">类别</th>
              <th style="width: 40px !important;">标底</th>
              <th>投标单位</th>
              <template v-for="(item, index) in pankingProcessList">
                <th>
                  <div class="hor">
                    <div class="hor ver-center pd-l-5">
                      {{ item.supplyCompany != null ? item.supplyCompany.name : null }}
                    </div>
                    <div v-if="item != null && item.supplyCompany != null" class="hor hor-center pd-l-5">
                      <div class="ver" v-if="item != null">
                        <div class="hor">
                          <el-link type="success" size="mini" class=" "
                                   @click="baoJiaHengXiangDuiBi(item)">报价横向对比
                          </el-link>
                        </div>
                        <div class="hor">
                          <el-link type="danger" size="mini" class=" "
                                   @click="danJiaDuiBi(item)">综合单价横向对比
                          </el-link>
                        </div>
                        <div class="hor">
                          <el-link type="primary" size="mini" class=" "
                                   @click="zengBuInfo(item)">增补信息
                          </el-link>
                        </div>
                      </div>
                    </div>
                  </div>
                </th>
              </template>
            </tr>
            <!--          消防部分（含消防维保）-->
            <tr v-for="index in 1" :key="index">
              <th style="width: 40px !important;">消防部分（含消防维保）</th>
              <template v-if="pankingProcessList.length > 0" v-for="(item, index) in pankingProcessList">
                <td v-if="index === 0" style="width: 40px !important;">
                  <div class="ver">
                    <div class="tdm">{{ item.xfbfBdVo != null ? item.xfbfBdVo.hsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.xfbfBdVo != null ? item.xfbfBdVo.bhsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> /</div>
                    <div class="tdx"></div>
                    <div class="tdm"> /</div>
                    <div class="tdx"></div>
                    <div class="tdm"> /</div>
                    <div class="tdx"></div>
                    <div class="tdm"> /</div>
                    <div class="tdx"></div>
                  </div>
                </td>
              </template>
              <td v-if="pankingProcessList.length == 0" style="width: 40px !important;">/</td>
              <td>
                <div class="ver">
                  <div class="tdm">含税报价</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价</div>
                  <div class="tdx"></div>
                  <div class="tdm">排名</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价与最低价%</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价与标底价%</div>
                  <div class="tdx"></div>
                  <div class="tdm">较上一轮差异率%</div>
                  <div class="tdx"></div>
                </div>
              </td>
              <template v-for="(item, index) in pankingProcessList">
                <td v-if="activeName == 1 && item.tempXfbf1 != null">
                  <div class="ver" v-if="item.tempXfbf1.supplyCompany != null">
                    <div class="tdm">{{ item.tempXfbf1.hsBaoJia.toFixed(2) }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempXfbf1.bhsBaoJia.toFixed(2) }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempXfbf1.paiMing }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ (item.tempXfbf1.bhszdLv * 100).toFixed(2) }}%</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ (item.tempXfbf1.bhsbdLv * 100).toFixed(2) }}%</div>
                    <div class="tdx"></div>
                    <div class="tdm">/</div>
                    <div class="tdx"></div>
                  </div>
                </td>
                <td v-if="activeName == 2 && item.tempXfbf2 != null">
                  <div class="ver" v-if="item.tempXfbf2.supplyCompany != null">
                    <div class="tdm">{{ item.tempXfbf2.hsBaoJia.toFixed(2) }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempXfbf2.bhsBaoJia.toFixed(2) }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempXfbf2.paiMing }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ (item.tempXfbf2.bhszdLv * 100).toFixed(2) }}%</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ (item.tempXfbf2.bhsbdLv * 100).toFixed(2) }}%</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ (item.tempXfbf2.chaYiLv * 100).toFixed(2) }}%</div>
                    <div class="tdx"></div>
                  </div>
                </td>
                <td v-if="activeName == 3 && item.tempXfbf3 != null">
                  <div class="ver" v-if="item.tempXfbf3.supplyCompany != null">
                    <div class="tdm">{{ item.tempXfbf3.hsBaoJia.toFixed(2) }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempXfbf3.bhsBaoJia.toFixed(2) }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempXfbf3.paiMing }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ (item.tempXfbf3.bhszdLv * 100).toFixed(2) }}%</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ (item.tempXfbf3.bhsbdLv * 100).toFixed(2) }}%</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ (item.tempXfbf3.chaYiLv * 100).toFixed(2) }}%</div>
                    <div class="tdx"></div>
                  </div>
                </td>
              </template>
            </tr>
            <!--抗震支架部分-->
            <div class="pd-tb10"></div>
            <tr v-for="index in 1" :key="index">
              <th style="width: 40px !important;">抗震支架部分</th>
              <template v-if="pankingProcessList.length > 0" v-for="(item, index) in pankingProcessList">
                <td v-if="index === 0" style="width: 40px !important;">
                  <div class="ver">
                    <span class="tdm">{{ item.kzzjBdVo != null ? item.kzzjBdVo.hsBaoJia.toFixed(2) : null }}</span>
                    <div class="tdx"></div>
                    <span class="tdm">{{ item.kzzjBdVo != null ? item.kzzjBdVo.bhsBaoJia.toFixed(2) : null }}</span>
                    <div class="tdx"></div>
                    <span class="tdm"> / </span>
                    <div class="tdx"></div>
                    <span class="tdm"> / </span>
                    <div class="tdx"></div>
                    <span class="tdm"> / </span>
                    <div class="tdx"></div>
                    <span class="tdm"> / </span>
                    <div class="tdx"></div>
                  </div>
                </td>
              </template>
              <td v-if="pankingProcessList.length == 0" style="width: 40px !important;">/</td>
              <td>
                <div class="ver">
                  <div class="tdm">含税报价</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价</div>
                  <div class="tdx"></div>
                  <div class="tdm">排名</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价与最低价%</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价与标底价%</div>
                  <div class="tdx"></div>
                  <div class="tdm">较上一轮差异率%</div>
                  <div class="tdx"></div>
                </div>
              </td>
              <template v-for="(item, index) in pankingProcessList">
                <td v-if="activeName == 1 && item.tempKzzj1 != null">
                  <div class="ver" v-if="item.tempKzzj1.supplyCompany != null">
                    <div class="tdm">{{ item.tempKzzj1 != null ? item.tempKzzj1.hsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempKzzj1 != null ? item.tempKzzj1.bhsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempKzzj1 != null ? item.tempKzzj1.paiMing : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempKzzj1 != null ? (item.tempKzzj1.bhszdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempKzzj1 != null ? (item.tempKzzj1.bhsbdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm">/</div>
                    <div class="tdx"></div>
                  </div>
                </td>
                <td v-if="activeName == 2 && item.tempKzzj2 != null">
                  <div class="ver" v-if="item.tempKzzj2.supplyCompany != null" style="width: 99%">
                    <div class="tdm">{{ item.tempKzzj2 != null ? item.tempKzzj2.hsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempKzzj2 != null ? item.tempKzzj2.bhsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{ item.tempKzzj2 != null ? item.tempKzzj2.paiMing : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempKzzj2 != null ? (item.tempKzzj2.bhszdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempKzzj2 != null ? (item.tempKzzj2.bhsbdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempKzzj2 != null ? (item.tempKzzj2.chaYiLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                  </div>
                </td>
                <td v-if="activeName == 3 && item.tempKzzj3 != null">
                  <div class="ver" v-if="item.tempKzzj3.supplyCompany != null" style="width: 99%">
                    <div class="tdm">{{ item.tempKzzj3 != null ? item.tempKzzj3.hsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempKzzj3 != null ? item.tempKzzj3.bhsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{ item.tempKzzj3 != null ? item.tempKzzj3.paiMing : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempKzzj3 != null ? (item.tempKzzj3.bhszdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempKzzj3 != null ? (item.tempKzzj3.bhsbdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempKzzj3 != null ? (item.tempKzzj3.chaYiLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                  </div>
                </td>
              </template>
            </tr>
            <!--总价-->
            <div class="pd-tb10"></div>
            <tr v-for="index in 1" :key="index">
              <th style="width: 40px !important;">总价</th>
              <template v-if="pankingProcessList.length > 0" v-for="(item, index) in pankingProcessList">
                <td v-if="index === 0" style="width: 40px !important;">
                  <div class="ver">
                    <span class="tdm">{{ item.bdzjVo != null ? item.bdzjVo.hsBaoJia.toFixed(2) : null }}</span>
                    <div class="tdx"></div>
                    <span class="tdm">{{ item.bdzjVo != null ? item.bdzjVo.bhsBaoJia.toFixed(2) : null }}</span>
                    <div class="tdx"></div>
                    <span class="tdm"> / </span>
                    <div class="tdx"></div>
                    <span class="tdm"> / </span>
                    <div class="tdx"></div>
                    <span class="tdm"> / </span>
                    <div class="tdx"></div>
                    <span class="tdm"> / </span>
                    <div class="tdx"></div>
                  </div>
                </td>
              </template>
              <td v-if="pankingProcessList.length == 0" style="width: 40px !important;">/</td>
<!--              <td style="width: 40px !important;">/</td>-->
              <td>
                <div class="ver">
                  <div class="tdm">含税报价</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价</div>
                  <div class="tdx"></div>
                  <div class="tdm">排名</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价与最低价%</div>
                  <div class="tdx"></div>
                  <div class="tdm">不含税报价与标底价%</div>
                  <div class="tdx"></div>
                  <div class="tdm">较上一轮差异率%</div>
                  <div class="tdx"></div>
                </div>
              </td>
              <template v-for="(item, index) in pankingProcessList">
                <td v-if="activeName == 1 && item.tempItem1 != null">
                  <div class="ver" v-if="item.tempItem1.supplyCompany != null" style="width: 99%">
                    <div class="tdm">{{ item.tempItem1 != null ? item.tempItem1.hsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempItem1 != null ? item.tempItem1.bhsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{ item.tempItem1 != null ? item.tempItem1.paiMing : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempItem1 != null ? (item.tempItem1.bhszdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm">{{
                        item.tempItem1 != null ? (item.tempItem1.bhsbdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm">/</div>
                    <div class="tdx"></div>
                  </div>
                </td>
                <td v-if="activeName == 2 && item.tempItem2 != null">
                  <div class="ver" v-if="item.tempItem2.supplyCompany != null" style="width: 99%">
                    <div class="tdm">{{ item.tempItem2 != null ? item.tempItem2.hsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempItem2 != null ? item.tempItem2.bhsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{ item.tempItem2 != null ? item.tempItem2.paiMing : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempItem2 != null ? (item.tempItem2.bhszdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempItem2 != null ? (item.tempItem2.bhsbdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm">{{
                        item.tempItem2 != null ? (item.tempItem2.chaYiLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                  </div>
                </td>
                <td v-if="activeName == 3 && item.tempItem3 != null">
                  <div class="ver" v-if="item.tempItem3.supplyCompany != null" style="width: 99%">
                    <div class="tdm">{{ item.tempItem3 != null ? item.tempItem3.hsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{ item.tempItem3 != null ? item.tempItem3.bhsBaoJia.toFixed(2) : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{ item.tempItem3 != null ? item.tempItem3.paiMing : null }}</div>
                    <div class="tdx"></div>
                    <div class="tdm">{{
                        item.tempItem3 != null ? (item.tempItem3.bhszdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempItem3 != null ? (item.tempItem3.bhsbdLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                    <div class="tdm"> {{
                        item.tempItem3 != null ? (item.tempItem3.chaYiLv * 100).toFixed(2) : null
                      }}%
                    </div>
                    <div class="tdx"></div>
                  </div>
                </td>
              </template>
            </tr>
          </table>
        </div>
      </div>
      <!--      增补信息-->
      <div class="">
        <el-dialog
          title="增补信息"
          :visible.sync="toDialogVisible"
          width="85%"
          height="70%"
          :before-close="handleClose"
          :close-on-click-modal="false">
          <div>
            <el-table
              ref="table"
              width="80%"
              v-loading="listLoading"
              :data="zengBuList"
              :height="autoHeight"
              element-loading-text="Loading"
              border
              fit
              highlight-current-row
              :row-class-name="tableRowClassName"
            >
              <el-table-column label="名称" align="center" width="">
                <template slot-scope="scope">
                  {{ scope.row.name }}
<!--                  <div :style="{'background-color': scope.row.isBidBase ? '#FFD700' : ''}">{{ scope.row.name }}</div>-->
                </template>
              </el-table-column>
              <el-table-column label="系统分类" align="center" width="100">
                <template slot-scope="scope">
                  {{ scope.row.xiTongFenLei }}
                </template>
              </el-table-column>
              <el-table-column label="分析分类1" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.fenXiFenLei1 }}
                </template>
              </el-table-column>
              <el-table-column label="分析分类2" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.fenXiFenLei2 }}
                </template>
              </el-table-column>
              <el-table-column label="规格型号" width="100" align="center">
                <template slot-scope="scope">
                  {{ scope.row.modelCode }}
                </template>
              </el-table-column>
              <el-table-column label="项目特征及主要工程内容" width="500" align="">
                <template slot-scope="scope">
                  {{ scope.row.teZhengNeiRong }}
                </template>
              </el-table-column>
              <el-table-column label="单位" width="60" align="center">
                <template slot-scope="scope">
                  {{ scope.row.unit }}
                </template>
              </el-table-column>
              <el-table-column label="品牌" width="100" align="center">
                <template slot-scope="scope">
                  {{ scope.row.brand }}
                </template>
              </el-table-column>
              <el-table-column label="主材供应方式" width="100" prop="gongChengLiang" align="center">
                <template slot-scope="scope">
                  {{ scope.row.zhuCaiGongYing }}
                </template>
              </el-table-column>
              <el-table-column label="工程量汇总" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangHuiZong }}
                </template>
              </el-table-column>
              <el-table-column label="工程量-地下室" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangDiXiShi }}
                </template>
              </el-table-column>
              <el-table-column label="工程量-高层" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangGaoCeng }}
                </template>
              </el-table-column>
              <el-table-column label="工程量-小高层" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangXiaoGaoCeng }}
                </template>
              </el-table-column>
              <el-table-column label="程量-洋房" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangYangFang }}
                </template>
              </el-table-column>
              <el-table-column label="工程量-商业" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangShangYe }}
                </template>
              </el-table-column>
              <el-table-column label="工程量-总平" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangZongPing }}
                </template>
              </el-table-column>
              <el-table-column label="工程量-别墅" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangBieShu }}
                </template>
              </el-table-column>
              <el-table-column label="工程量-公寓" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangGongYu }}
                </template>
              </el-table-column>
              <el-table-column label="工程量-幼儿园" width="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.gongChengLiangYouErYuan }}
                </template>
              </el-table-column>
              <el-table-column label="综合单价1(新项目不含增值税)" width="" prop="shuiJin" align="center">
                <template slot-scope="scope">
                  <div class="text-center"
                       :class="{'bg-red':scope.row.comprehensivePriceBhsCalcd!=scope.row.comprehensivePriceBhs,'font-color-white':scope.row.comprehensivePriceBhsCalcd!=scope.row.comprehensivePriceBhs,'font-black':scope.row.comprehensivePriceBhsCalcd == scope.row.comprehensivePriceBhs}">
                    {{ scope.row.comprehensivePriceBhs }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="综合单价1(新项目不含增值税计算值)" width="100" prop="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.comprehensivePriceBhsCalcd }}
                </template>
              </el-table-column>
              <el-table-column label="综合单价2(新项目不含增值税)" width="" prop="shuiJin" align="center">
                <template slot-scope="scope">
                  <div class="text-center"
                       :class="{'bg-red':scope.row.comprehensivePriceHsCalcd!=scope.row.comprehensivePriceHs,'font-color-white':scope.row.comprehensivePriceHsCalcd!=scope.row.comprehensivePriceHs,'font-black':scope.row.comprehensivePriceHsCalcd == scope.row.comprehensivePriceHs}">
                    {{ scope.row.comprehensivePriceHs }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="综合单价2(新项目含增值税计算值)" width="100" prop="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.comprehensivePriceHsCalcd }}
                </template>
              </el-table-column>
              <el-table-column label="人工费" width="100" prop="renGongCost" align="center">
                <template slot-scope="scope">
                  {{ scope.row.renGongCost }}
                </template>
              </el-table-column>
              <el-table-column label="主材费" width="100" prop="zhuCaiCost" align="center">
                <template slot-scope="scope">
                  {{ scope.row.zhuCaiCost }}
                </template>
              </el-table-column>
              <el-table-column label="辅材及其他材料费" width="100" prop="fuCaiCost" align="center">
                <template slot-scope="scope">
                  {{ scope.row.fuCaiCost }}
                </template>
              </el-table-column>
              <el-table-column label="机械费" width="100" prop="jiXieCost" align="center">
                <template slot-scope="scope">
                  {{ scope.row.jiXieCost }}
                </template>
              </el-table-column>
              <el-table-column label="企业管理费" width="" prop="" align="center">
                <template slot-scope="scope">
                  <div class="text-center"
                       :class="{'bg-red':scope.row.qiYeCalcd!=scope.row.qiYeCost,'font-color-white':scope.row.qiYeCalcd!=scope.row.qiYeCost,'font-black':scope.row.qiYeCalcd == scope.row.qiYeCost}">
                    {{ scope.row.qiYeCost }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="企业管理费(计算值)" width="100" prop="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.qiYeCalcd }}
                </template>
              </el-table-column>
              <el-table-column label="增值税税额" width="" prop="" align="center">
                <template slot-scope="scope">
                  <div class="text-center"
                       :class="{'bg-red':scope.row.shuiJinCalcd!=scope.row.shuiJin,'font-color-white':scope.row.shuiJinCalcd!=scope.row.shuiJin,'font-black':scope.row.shuiJinCalcd == scope.row.shuiJin}">
                    {{ scope.row.shuiJin }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="增值税税额(计算值)" width="100" prop="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.shuiJinCalcd }}
                </template>
              </el-table-column>
              <el-table-column label="不含增值税合价" width="" prop="comprehensivePrice" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPriceBhs != null && scope.row.totalPriceBhs !== ''">{{
                      scope.row.totalPriceBhs.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="含增值税合价" width="" prop="totalPrice" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPriceHs != null && scope.row.totalPriceHs !== ''">{{
                      scope.row.totalPriceHs.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>

              <el-table-column label="地下室含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice1 != null && scope.row.totalPrice1 !== ''">{{
                      scope.row.totalPrice1.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="高层含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice2 != null && scope.row.totalPrice2 !== ''">{{
                      scope.row.totalPrice2.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="小高层含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice3 != null && scope.row.totalPrice3 !== ''">{{
                      scope.row.totalPrice3.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="洋房含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice4 != null && scope.row.totalPrice4 !== ''">{{
                      scope.row.totalPrice4.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="商业含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice5 != null && scope.row.totalPrice5 !== ''">{{
                      scope.row.totalPrice5.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="总平含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice6 != null && scope.row.totalPrice6 !== ''">{{
                      scope.row.totalPrice6.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="别墅含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice7 != null && scope.row.totalPrice7 !== ''">{{
                      scope.row.totalPrice7.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="公寓含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice8 != null && scope.row.totalPrice8 !== ''">{{
                      scope.row.totalPrice8.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="幼儿园含增值税合价" width="" prop="" align="center">
                <template slot-scope="scope">
                  <span
                    v-if="scope.row.totalPrice9 != null && scope.row.totalPrice9 !== ''">{{
                      scope.row.totalPrice9.toFixed(2)
                    }}</span>
                  <span v-else></span>
                </template>
              </el-table-column>
              <el-table-column label="备注" width="" prop="" align="center">
                <template slot-scope="scope">
                  {{ scope.row.remarks }}
                </template>
              </el-table-column>
            </el-table>
          </div>
          <div class="hor">
            <div class="pd-tb5 tip hor">淡绿色背景内容在标底中不存在</div>
            <div class="flex1"></div>
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="page"
              :page-sizes="[20, 50, 100, 200]"
              :page-size="size"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total"
              class="mg-t-10">
            </el-pagination>
          </div>
        </el-dialog>
      </div>
    </div>
  </div>
</template>

<script>

import {getCityData} from "@/js/cityData";

const requestSupplier = require('@/api/project/supplyCompany')
const requestXfgcBiddingCompany = require('@/api/project/xfgcBiddingCompany')
const request = require('@/api/comprehensive/xfgcStatisticalAnalysis')
const requestXfgc = require('@/api/tabulation/xfgcTabulation')
export default {
  name: "statisticalAnalysis.vue",
  data() {
    return {
      projectInfo: {},
      allList: [],
      pankingProcessList: [],
      page: 1,
      size: 20,
      total: 0,
      autoHeight: 600,//根据屏幕高度自动计算的高度
      //筛选参数
      params: {
        flag: 1,
      },
      listLoading: false,
      onSaveLoading: false,
      areaData: [],
      activeName: 1,
      zengBuList: [],
      toDialogVisible: false,
      parameterItem: null,
    }
  },
  beforeMount() {
    this.autoHeight = document.body.scrollHeight - 220
    this.projectInfo = JSON.parse(this.$route.query.projectInfo)
  },
  mounted() {
    this.areaData = getCityData()
    this.handleClick()
    // this.getRankingProcess()
    //去掉第三级的信息
    for (let i = 0; i < this.areaData.length; i++) {
      if (this.areaData[i].children != null && this.areaData[i].children.length > 0) {
        for (let j = 0; j < this.areaData[i].children.length; j++) {
          this.areaData[i].children[j].children = null
        }
      }
    }
  },
  methods: {
    //存在于定标清单中的增补清单数据标记颜色
    tableRowClassName({row, rowIndex}) {
      if (row.isBidBase) {
        return 'bid-base-row';
      }
      return '';
    },
    formatDate(timestamp) {
      const date = new Date(timestamp);
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, '0');
      const day = String(date.getDate()).padStart(2, '0');
      const hours = String(date.getHours()).padStart(2, '0');
      const minutes = String(date.getMinutes()).padStart(2, '0');
      const seconds = String(date.getSeconds()).padStart(2, '0');

      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },
    getJieDuanName(value) {
      switch (value) {
        case 1:
          return "标底";
        case 2:
          return "回标1";
        case 3:
          return "回标2";
        case 4:
          return "回标3";
        case 5:
          return "定标"
        default:
          return "";
      }
    },
    handleClick() {
      this.getRankingProcess()
    },
    onClickSearch() {
      this.getRankingProcess()
    },
    onClickOpen(type) {
      const {href} = this.$router.resolve({
        path: "/xfgcStatistic/Dashboard?type=" + type + "&projectInfo=" + JSON.stringify(this.projectInfo)
      })
      window.open(href, '_blank')//新窗口打开页面会卡死所以不开新窗口
    },
    baoJiaHengXiangDuiBi(item) {
      const {href} = this.$router.resolve({
        path: "/xfgcStatistic/Dashboard?type=" + 4 + "&projectInfo=" + JSON.stringify(this.projectInfo) + "&supplyCompany=" + JSON.stringify(item.supplyCompany)
      })
      window.open(href, '_blank')//新窗口打开页面会卡死所以不开新窗口
    },
    danJiaDuiBi(item) {
      const {href} = this.$router.resolve({
        path: "/xfgcStatistic/Dashboard?type=" + 2 + "&projectInfo=" + JSON.stringify(this.projectInfo) + "&supplyCompany=" + JSON.stringify(item.supplyCompany)
      })
      window.open(href, '_blank')//新窗口打开页面会卡死所以不开新窗口
    },
    handleClose() {
      this.page = 1
      this.getRankingProcess()
      this.toDialogVisible = false;
      this.parameterItem = null
    },
    //查询清单增补信息
    zengBuInfo(item) {
      this.page = 1;
      this.parameterItem = item
      this.zengBuXfgcList()
      this.toDialogVisible = true;
    },
    zengBuXfgcList() {
      this.listLoading = true
      const data = new FormData()
      for (var key in this.params) {//直接去除掉空值的对象
        if (this.isEmpty(this.params[key])) {
          delete this.params[key]
        }
      }
      var supplyCompanyId = 0;
      var jieDuan = 0;
      if (this.activeName == 1 && this.parameterItem != null) {
        supplyCompanyId = this.parameterItem.supplyCompany.id
        jieDuan = 2
      }
      if (this.activeName == 2 && this.parameterItem != null) {
        supplyCompanyId = this.parameterItem.supplyCompany.id
        jieDuan = 3
      }
      if (this.activeName == 3 && this.parameterItem != null) {
        supplyCompanyId = this.parameterItem.supplyCompany.id
        jieDuan = 4
      }
      this.params['xfgcBiddingCompany.supplyCompany.id'] = supplyCompanyId
      this.params['xfgcBiddingCompany.project.id'] = this.projectInfo.id
      this.params['jieDuan'] = jieDuan
      this.params['nameType2_isnotnull'] = null
      data.append('params', JSON.stringify(this.params))
      data.append('page', this.page)
      data.append('size', this.size)

      const sortList = []
      sortList.push(
        {
          direction: 'desc',
          property: 'createTime'
        }
      )
      data.append('sortJsonStr', JSON.stringify(sortList))
      requestXfgc.getZengBuList(data).then(response => {
        this.total = response.totalElements
        this.zengBuList = response.data
        this.listLoading = false
      })
    },

    handleSizeChange(val) {
      this.size = val
      this.zengBuXfgcList()
    },
    handleCurrentChange(val) {
      this.page = val
      this.zengBuXfgcList()
    },

    getRankingProcess() {
      this.listLoading = true;
      const data = new FormData();
      data.append('projectId', this.projectInfo.id);
      // 构建排序参数
      const sortList = [
        {
          direction: 'desc',
          property: 'createTime'
        }
      ];
      data.append('sortJsonStr', JSON.stringify(sortList));
      request.getRankingProcess(data).then(response => {
        this.pankingProcessList = response.data; // 修正可能的打字错误
        this.total = response.totalElements;
        this.listLoading = false;
        var loadingOverlay = document.querySelector('.loading-overlay');
        if (loadingOverlay) {
          loadingOverlay.style.display = 'none';
        }
      }).catch(error => {
        console.error('Error:', error);
        this.listLoading = false;
        var loadingOverlay = document.querySelector('.loading-overlay');
        if (loadingOverlay) {
          loadingOverlay.style.display = 'none';
        }
      });
    },


  }
}
</script>
<style>
.el-table .bid-base-row {
  background: #f0f9eb;
}
</style>

<style scoped>
.cus-table {
  border-collapse: collapse;
  text-align: center;
}

.cus-table td, .cus-table th {
  border: 1px solid #cad9ea;
  color: #424242;
  height: 50px;
}

.cus-table th {
  background-color: #EFEFEF;
  width: 100px;
  color: #414141;
  font-size: 12px;
}

.tdm {
  /*color: #424242;*/
  height: 50px;
  line-height: 50px;
  font-size: 10px;
  width: 120px;
}

.tdx {
  /*border: dashed 1px solid #cad9ea;*/
  color: #424242;
  /*height: 50px;*/
  /*line-height: 50px;*/
  /*font-size: 10px;*/
  width: 100%;
}

.tdx:not(:last-child) {
  border-bottom: 1px solid #cad9ea;
}


.tip {
  color: red;
  padding-top: 1rem;
}

.cus-table.match-width {
  position: relative;
}
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.loading-text {
  font-size: 20px;
  font-weight: bold;
}
</style>
